package ar.edu.unlam.lyc.notacionIntermedia;

public class Terceto {
	public String a;
	public String b;
	public String c;
	public boolean preEtiquetado = false;
	public boolean direccionArray = false;

	public Terceto(String a, String b, String c) {
		this.a = a.toUpperCase();
		this.b = b.toUpperCase();
		this.c = c.toUpperCase();
	}

	public String toString() {
		if (a == "")
			a = "-";
		if (b == "")
			b = "-";
		if (c == "")
			c = "-";
		return (preEtiquetado ? "[" : "(") + a + "," + b + "," + c
				+ (preEtiquetado ? "]" : ")");
	}

	public String toString2() {
		String r = "";
		r += "(";
		r += this.a;
		r += ", ";
		r += (this.b.startsWith("#")) ? this.b.replace('#', '[') + "]"
				: ((this.b).startsWith("$") ? this.b.replace('$', '{') + "}"
						: this.b);
		r += ", ";
		r += (this.c.startsWith("#")) ? this.c.replace('#', '[') + "]"
				: ((this.b).startsWith("$") ? this.c.replace('$', '{') + "}"
						: this.c);
		r += ")";
		r += (this.direccionArray) ? " i" : "";
		return r;
	}
}
